<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Elisa3: e_agenda.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Elisa3
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('e__agenda_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">e_agenda.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="e__agenda_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/********************************************************************************</span>
<a name="l00002"></a>00002 <span class="comment"></span>
<a name="l00003"></a>00003 <span class="comment">                        Advance agenda events of e-puck                                                 </span>
<a name="l00004"></a>00004 <span class="comment">                        December 2004: first version                                                    </span>
<a name="l00005"></a>00005 <span class="comment">                        Lucas Meier &amp; Francesco Mondada </span>
<a name="l00006"></a>00006 <span class="comment"></span>
<a name="l00007"></a>00007 <span class="comment"></span>
<a name="l00008"></a>00008 <span class="comment">This file is part of the e-puck library license.</span>
<a name="l00009"></a>00009 <span class="comment">See http://www.e-puck.org/index.php?option=com_content&amp;task=view&amp;id=18&amp;Itemid=45</span>
<a name="l00010"></a>00010 <span class="comment"></span>
<a name="l00011"></a>00011 <span class="comment">(c) 2004-2007 Francesco Mondada, Lucas Meier</span>
<a name="l00012"></a>00012 <span class="comment"></span>
<a name="l00013"></a>00013 <span class="comment">Robotics system laboratory http://lsro.epfl.ch</span>
<a name="l00014"></a>00014 <span class="comment">Laboratory of intelligent systems http://lis.epfl.ch</span>
<a name="l00015"></a>00015 <span class="comment">Swarm intelligent systems group http://swis.epfl.ch</span>
<a name="l00016"></a>00016 <span class="comment">EPFL Ecole polytechnique federale de Lausanne http://www.epfl.ch</span>
<a name="l00017"></a>00017 <span class="comment"></span>
<a name="l00018"></a>00018 <span class="comment">**********************************************************************************/</span>
<a name="l00019"></a>00019 
<a name="l00035"></a>00035 <span class="preprocessor">#ifndef __AGENDA_H__</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#define __AGENDA_H__</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span>
<a name="l00038"></a>00038 
<a name="l00039"></a><a class="code" href="e__agenda_8h.html#ab25f69a8f70b77d7ec3ed0dfd8dbc553">00039</a> <span class="preprocessor">#define AG_ALREADY_CREATED      1</span>
<a name="l00040"></a><a class="code" href="e__agenda_8h.html#ad57ebd29c3b0f3a04921b852641ea89f">00040</a> <span class="preprocessor"></span><span class="preprocessor">#define AG_NOT_FOUND            2</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span>
<a name="l00042"></a>00042 <span class="comment">/**********************************************************************</span>
<a name="l00043"></a>00043 <span class="comment"> * ------------------------ Type definition ---------------------------</span>
<a name="l00044"></a>00044 <span class="comment"> **********************************************************************/</span>
<a name="l00045"></a>00045 
<a name="l00046"></a><a class="code" href="e__agenda_8h.html#ac5fcf8d01892e627363302a34dae461a">00046</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_agenda_type.html" title="srtuct Agenda as chained list">AgendaType</a> <a class="code" href="struct_agenda_type.html" title="srtuct Agenda as chained list">Agenda</a>;
<a name="l00047"></a>00047 
<a name="l00058"></a><a class="code" href="struct_agenda_type.html">00058</a> <span class="keyword">struct </span><a class="code" href="struct_agenda_type.html" title="srtuct Agenda as chained list">AgendaType</a>
<a name="l00059"></a>00059 {
<a name="l00060"></a><a class="code" href="struct_agenda_type.html#a93fad93374611a30d6cb5521c15fa80a">00060</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>  <a class="code" href="struct_agenda_type.html#a93fad93374611a30d6cb5521c15fa80a">cycle</a>;          
<a name="l00061"></a><a class="code" href="struct_agenda_type.html#a617a47c70795bcff659815ad0efd2266">00061</a>   <span class="keywordtype">int</span>  <a class="code" href="struct_agenda_type.html#a617a47c70795bcff659815ad0efd2266">counter</a>;                         
<a name="l00062"></a><a class="code" href="struct_agenda_type.html#ad09bc59ff631dd675458d87526d30cdf">00062</a>   <span class="keywordtype">char</span> <a class="code" href="struct_agenda_type.html#ad09bc59ff631dd675458d87526d30cdf">activate</a>;                        
<a name="l00063"></a><a class="code" href="struct_agenda_type.html#a0bd084ac2d6295338fa17d35371990b9">00063</a>   void (*<span class="keyword">function</span>) (void);      
<a name="l00066"></a><a class="code" href="struct_agenda_type.html#afb66f482f91a88cf46ee9a19915ee634">00066</a>   <a class="code" href="struct_agenda_type.html" title="srtuct Agenda as chained list">Agenda</a> *<a class="code" href="struct_agenda_type.html#afb66f482f91a88cf46ee9a19915ee634">next</a>;                         
<a name="l00067"></a>00067 };
<a name="l00068"></a>00068 
<a name="l00069"></a>00069 
<a name="l00070"></a>00070 <span class="comment">/***********************************************************************</span>
<a name="l00071"></a>00071 <span class="comment"> * ------------------------ From agenda.c file --------------------------</span>
<a name="l00072"></a>00072 <span class="comment"> **********************************************************************/</span>
<a name="l00073"></a>00073 <span class="keywordtype">void</span> <a class="code" href="e__agenda_8c.html#ad54182362fe997bb2122a391bad52323" title="Start the agendas processing.">e_start_agendas_processing</a>(<span class="keywordtype">void</span>);
<a name="l00074"></a>00074 <span class="keywordtype">void</span> <a class="code" href="e__agenda_8c.html#a7edb1893889be619f706f9f79cf54817" title="Stop all the agendas.">e_end_agendas_processing</a>(<span class="keywordtype">void</span>);
<a name="l00075"></a>00075 
<a name="l00076"></a>00076 <span class="keywordtype">int</span> <a class="code" href="e__agenda_8c.html#a61f859f200c4877ab942af3884838379" title="Activate an agenda.">e_activate_agenda</a>(<span class="keywordtype">void</span> (*func)(<span class="keywordtype">void</span>), <span class="keywordtype">int</span> cycle);
<a name="l00077"></a>00077 <span class="keywordtype">int</span> <a class="code" href="e__agenda_8c.html#af5e7efa985f5e0ae59815082d0cfd2d6" title="Destroy an agenda.">e_destroy_agenda</a>(<span class="keywordtype">void</span> (*func)(<span class="keywordtype">void</span>));
<a name="l00078"></a>00078 
<a name="l00079"></a>00079 <span class="keywordtype">int</span> <a class="code" href="e__agenda_8c.html#ab5b08749f3a6ccc4cf338abf8ab49845" title="Change the cycle value of an agenda.">e_set_agenda_cycle</a>(<span class="keywordtype">void</span> (*func)(<span class="keywordtype">void</span>), <span class="keywordtype">int</span> cycle);
<a name="l00080"></a>00080 <span class="keywordtype">int</span> <a class="code" href="e__agenda_8c.html#a561493b88bf2f528e29caad95bcf5e00" title="Reset an agenda&#39;s counter.">e_reset_agenda</a>(<span class="keywordtype">void</span> (*func)(<span class="keywordtype">void</span>));
<a name="l00081"></a>00081 
<a name="l00082"></a>00082 <span class="keywordtype">int</span> <a class="code" href="e__agenda_8c.html#af6a7765df88af34b8b589dc49aa3d818" title="Pause an agenda.">e_pause_agenda</a>(<span class="keywordtype">void</span> (*func)(<span class="keywordtype">void</span>));
<a name="l00083"></a>00083 <span class="keywordtype">int</span> <a class="code" href="e__agenda_8c.html#a625633eabf9997ed1305fdb3510038f2" title="Restart an agenda previously paused.">e_restart_agenda</a>(<span class="keywordtype">void</span> (*func)(<span class="keywordtype">void</span>));
<a name="l00084"></a>00084 
<a name="l00085"></a>00085 <span class="preprocessor">#endif </span><span class="comment">/* __AGENDA_H__ */</span>
<a name="l00086"></a>00086 
<a name="l00087"></a>00087 
<a name="l00088"></a>00088 <span class="comment">/* End of File : agenda.h */</span>
</pre></div></div><!-- contents -->
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="e__agenda_8h.html">e_agenda.h</a>      </li>

    <li class="footer">Generated on Tue Feb 21 2012 07:45:19 for Elisa3 by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
